package com.mini.mysql.service;

import com.mini.mysql.model.BusinessBaseInfo;
import com.mini.mysql.repository.BusinessBaseInfoRepository;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.Date;
import java.util.List;

/**
 * @author shixiaopeng  on 2021/3/31
 */
@Service
@Slf4j
public class BusinessBaseInfoService {

    @Autowired
    private BusinessBaseInfoRepository businessBaseInfoRepository;

    public List<BusinessBaseInfo> findByUpdateTimeBetween(Date startTime, Date endTime) {
        return businessBaseInfoRepository.findByUpdateTimeBetweenOrderByUpdateTimeAsc(startTime, endTime);
    }
}
